-----------------------------------------------------------------------------
                              RF550 Encoder
                               Version 1.2
                     (C) 2026 Giuseppe Perotti, I1EPJ
-----------------------------------------------------------------------------
                               USER MANUAL
-----------------------------------------------------------------------------

Commands available from the front panel:
-----------------------------------------------------------------------------

Encoder knob: rotate to set the value of the selected parameter digit
              (VFO frequency, memory number or programmable step value).

Encoder knob switch (press knob to activate):

    VFO mode (cursor in the display FREQ: line)
    --------------------------------------------------------------------------
    short press    : change the frequency digit to be modified;
    medium press   : change mode to memory;
    long press     : copy the VFO frequency in the currently selected memory.
    Very long press: backlight toggle, if supported by the display used.

    Setting the digit to be modified (i. e. the cursor) at left of the
    10MHz figure enables the programmable step mode. A "PS" annunciator
    is shown at that location. Rotating the knob the frequency is then
    modified by the programmable step value set.

    Memory mode (cursor in the display Mnnn: or PRST: line)
    --------------------------------------------------------------------------
    short press    : change the memory digit to be modified;
    medium press   : change mode to VFO/set new programmable step value;
    long press     : copy the currently selected memory frequency to VFO
    Very long press: backlight toggle, if supported by the display used.

    Setting the memory number before 0 or after 999 (the one that should be
    memory 1000) shows the programmable step value. The line title becomes
    "PRST:" instead of "Mnnn:" and the frequency step value is shown.
    In this state subsequent knob rotations return the encoder in the memory
    mode. A short press instead starts the programmable step
    setting mode. Subsequent short presses select the figure to be
    modified with the encoder knob. A medium press sets the new
    programmable step value and goes back to memory select mode. The
    programmable step may be set to any value between 100Hz and
    999.9kHz. The code could also handle bigger steps, though that
    wouldn't make much sense, therefore the adjustment range is limited
    to what has been stated above.

    "Short press" means pressing the knob for less than 1s.
    "Medium press" means pressing the knob for more that 1s but less than 2s.
    "Long press" means pressing the knob for more that 2s but less than 4s.
    "Very long press" means pressing the knob for more than 4s.

    To ease knob press time evaluation, a growing block indicator is shown at
    left of the frequency value. If it is "▁", then this will be a short press.
    If it is "▅", then this will be a medium press. If it is "▇", this will be
    a long press. If a "B" is shown, this will be a very long press (Backlight
    toggle, if supported by the display used). Release the knob when the
    desired time has elapsed.

    In memory mode 1000 memories are available, numbered from 0 to 999.
    The memory 1000 is the programmable step show/setup mode.


Available commands (via the Arduino USB virtual serial port):
-----------------------------------------------------------------------------
B[<n>]    Set/Get blinking cursor status: <n>=0 OFF <n>=1 ON.
C         Copy current memory frequency to VFO and go to VFO mode.
EEE       Init EEPROM (three uppercase E required).
F[<fr>]   Set/Get VFO frequency.
H         Show this help text.
I         Show program info and license.
M[<nnn>]  Show current/Recall memory <nnn> and go to memory mode.
O         Save options in EEPROM.
P[<step>] Set/Get programmable step
R         Check encoder presence and version (reply is RRR:<version>)
U[<n>]    Set/Get numeric format: <n>=0 ITA, <n>=1 USA.
S         Show current status.
X[<m>]    Set VFO/Memory mode: <m>=V VFO, <m>=M Memory.
W<mnum>   Write current VFO frequency to memory mnum.
Z[<n>]    Set/Get not-significant zero suppression: <n>=0 OFF <n>=1 ON.


Notes
-----
If a command is issued without the optional parameter, the current value of
that parameter is shown.

To avoid unwanted deletions, the command to reinitialize the EEPROM must be
issued in UPPER CASE and repeated exactly three times, so it is required to
type EEE, any other form (e.g. eee, EEEE, EE, E, etc.) triggers an error.

Commands have a 5s timeout, after which a CR is implicitly assumed, e.g.
if you type F and then stop typing, after 5s the F command is executed.


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  After modifying some configuration, remember that the new value is not   !
!   automatically stored in EEPROM. To do so You must use the O command,    !
!   otherwise the new value will be lost when You power down the encoder.   !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
